home *** CD-ROM | disk | FTP | other *** search
- function loadWelcome()
- {
- welcome = new XML();
- welcome.ignoreWhite = true;
- welcome.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- renderSettings();
- }
- };
- welcome.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- };
- welcome.preload(fsp_path + folder + "config/welcome.xml",false);
- }
- function loadOnline()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading online..","");
- }
- online = new XML();
- online.ignoreWhite = true;
- online.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- loadWelcome();
- }
- };
- online.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- };
- online.preload(fsp_path + folder + "config/online.xml",false);
- }
- function loadHelp()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading help..","");
- }
- help = new XML();
- help.ignoreWhite = true;
- help.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- loadOnline();
- }
- };
- help.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- };
- help.preload(fsp_path + folder + "config/help.xml",false);
- }
- function loadStyles()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading styles..","");
- }
- styles = new XML();
- styles.ignoreWhite = true;
- styles.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- loadHelp();
- }
- };
- styles.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- };
- styles.preload(fsp_path + folder + "config/styles.xml",false);
- }
- function loadContent()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading content..","");
- }
- cd_content = new XML();
- cd_content.ignoreWhite = true;
- cd_content.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- notifyDebugger("Before RenderVideoDataArray");
- renderVideoDataArray(cd_content.firstChild.childNodes,[0]);
- }
- };
- cd_content.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading Content " + percentLoaded + "%","");
- }
- };
- cd_content.preload(fsp_path + folder + "config/content.xml",false);
- }
- function loadSettings()
- {
- if(client_os == "Windows")
- {
- mdm.Forms.SplashForm.callFunction("output","Loading settings..","");
- }
- settings = new XML();
- settings.ignoreWhite = true;
- settings.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- loadStyles();
- }
- };
- settings.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded)
- {
- };
- settings.preload(fsp_path + folder + "config/settings.xml",false);
- }
- function loadClip(_file, _mc, __width, __height, __scale_mode, __bitmap, __function, _fade, __visible, __initialize, __callback)
- {
- var mcLoaderListener = new Object();
- var clipMCL = new MovieClipLoader();
- mcLoaderListener.onLoadStart = function(targetMC)
- {
- targetMC._visible = false;
- };
- mcLoaderListener.onLoadProgress = function(targetMC, loadedBytes, totalBytes)
- {
- };
- mcLoaderListener.onLoadComplete = function(targetMC)
- {
- };
- mcLoaderListener.onLoadInit = function(targetMC)
- {
- if(__bitmap)
- {
- var _loc3_ = new flash.display.BitmapData(targetMC._width,targetMC._height,true,16777215);
- _loc3_.draw(targetMC);
- targetMC.attachBitmap(_loc3_,1,"auto",true);
- }
- if(__scale_mode == "fullfixed")
- {
- faktor1 = Stage.width / targetMC._width;
- faktor2 = Stage.height / targetMC._height;
- if(faktor1 > faktor2)
- {
- ratio = faktor1;
- }
- else
- {
- ratio = faktor2;
- }
- targetMC._width *= ratio;
- targetMC._height *= ratio;
- }
- else if(__scale_mode == "widthfixed")
- {
- ratio = __width / targetMC._width;
- targetMC._width = __width;
- targetMC._height *= ratio;
- }
- else if(__scale_mode == "heightfixed")
- {
- ratio = __height / targetMC._height;
- targetMC._width *= ratio;
- targetMC._height = __height;
- }
- else if(__scale_mode == "widthfixedmasked")
- {
- _mc._parent.createEmptyMovieClip("target_mask_mc",_mc._parent.getNextHighestDepth());
- _mc._parent.target_mask_mc._y = _mc._y;
- _mc._parent.target_mask_mc._visible = false;
- _root.drawBox(_mc._parent.target_mask_mc,__width,__height,16711680,16711680,100,100,"linear");
- targetMC.setMask(_mc._parent.target_mask_mc);
- ratio = __width / targetMC._width;
- targetMC._width = __width;
- targetMC._height *= ratio;
- }
- else if(__scale_mode == "mc_centered")
- {
- targetMC._x = Math.round(__width / 2 - targetMC._width / 2);
- targetMC._y = Math.round(__height / 2 - targetMC._height / 2);
- }
- else
- {
- if(__width)
- {
- targetMC._width = __width;
- }
- if(__height)
- {
- targetMC._height = __height;
- }
- }
- if(__function)
- {
- __function();
- }
- if(__visible)
- {
- targetMC._alpha = 0;
- targetMC._visible = true;
- if(_fade)
- {
- targetMC.tween("_alpha",100,1,"easeOutQuart");
- }
- else
- {
- targetMC._alpha = 100;
- }
- }
- if(__initialize)
- {
- targetMC.init();
- }
- if(__callback)
- {
- __callback();
- }
- clipMCL.removeListener(mcLoaderListener);
- };
- mcLoaderListener.onLoadError = function(targetMC, errorCode)
- {
- };
- clipMCL.addListener(mcLoaderListener);
- clipMCL.loadClip(_file,_mc);
- }
-